package com.ttx.pattern.example.command.after.command;

import com.ttx.pattern.example.command.after.receiver.IDrawTool;

/**
 * @author TimFruit
 * @date 19-5-5 下午11:10
 */
public class DrawRectangleCommand implements Command {

    private IDrawTool tool;

    public DrawRectangleCommand(IDrawTool tool) {
        this.tool = tool;
    }

    @Override
    public void execute() {
        tool.drawShape("长方形");
    }
}
